package com.example.videos.controller;

import com.example.videos.service.VideoService;
import org.example.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/video")
public class VideoController {
    @Autowired
    VideoService videoService;


    @PostMapping("/publish")
    public Result<VideoRespDTO> publish(@RequestBody VideoReqDTO videoReqDTO){
        return Result.success(videoService.publish(videoReqDTO));
    }

}
